<p class="clueTitle">
    新增案件</p>
<form *ngIf="caseList" class='form'>
    <p class="searchList">
        <label for="djh">登记号:
            <input type="text"  name='code' id="djh" [(ngModel)]="caseList.cmsCase.registerCode">
        </label>

        <label for="djsj">登记时间： 
            <nz-date-picker   [(ngModel)]="caseList.cmsCase.createdAt" nzFormat="yyyy-MM-dd HH:mm:ss"   name="createdAt" nzPlaceHolder='请选择' ></nz-date-picker> 
        </label>
        <label for="djr">登记人:
            <input type="text" name="registerName" id="djr" [(ngModel)]="caseList.cmsCase.registrant.registerName">
        </label>
        <label for=""> 登记机关：
            <nz-tree-select
                #orgTree
                style="width: 300px"
                name="targetOrgId"
                nzPlaceHolder="请选择组织"
                [nzDefaultExpandedKeys]="expandKeys"
                [nzDropdownMatchSelectWidth]="true"
                [nzDropdownStyle]="{ 'max-height': '300px' }"
                [(ngModel)]="caseList.cmsCase.registrant.orgId"
                [nzNodes]="nodes"
                [nzAsyncData]="true"
                (ngModelChange)="getSelectedNodeList($event)"
            >
            </nz-tree-select>
        </label>
    </p>
    <div class="formContent">
        <p class="formContentLyfl">
            <span>来源分类：</span>
            <nz-radio-group name="sourceType" [(ngModel)]="caseList.cmsCase.sourceType" (ngModelChange)='radiochang($event)'>
                <label nz-radio name="flly" nzValue="1001">监督检查</label>
                <label nz-radio name="flly" nzValue="1002">投诉、举报</label>
                <label nz-radio name="flly" nzValue="1003">其他部门移送</label>
                <label nz-radio name="flly" nzValue="1004">上级交办</label>
                <label nz-radio name="flly" nzValue="1005">其他</label>
            </nz-radio-group>
        </p>
        <div class="formContentBox">
            <div class="aytgr" *ngIf="caseList.cmsCase.sourceType==1001">
                <div class="commonTitle"><i></i>案源提供人</div>
                <div class="aytgrContent">
                    <p class="p1">
                        <label>
                        <span>监督检查人：</span><input type="text" id="jdjcr" name="jcr" class="input1" [(ngModel)]="caseList.cmsCase.provider.jcr1">
                      </label>
                        <label>
                        <span>所属单位：</span><input type="text" id="ssdw" class="input2" name="ssdw"  [(ngModel)]="caseList.cmsCase.provider.ssdw1">
                      </label>
                    </p>
                    <p class="p2">
                        <label>
                        <span>监督检查人：</span><input type="text" id="jdjcr2" class="input1"name="jcr"  [(ngModel)]="caseList.cmsCase.provider.jcr2">
                    </label>
                        <label>
                        <span>所属单位：</span><input type="text" id="ssdw3" class="input2" name="ssdw" [(ngModel)]="caseList.cmsCase.provider.ssdw2">
                    </label>
                    </p>
                </div>
            </div>
            <div class="aytgr" *ngIf="caseList.cmsCase.sourceType==1002">
                <div class="commonTitle"><i></i>案源提供人</div>
                <div class="aytgrContent">
                    <table>
                        <tr>
                            <td>投诉、举报人类型：</td>
                            <td>
                                <nz-select style="width: 120px;vertical-align: middle" (ngModelChange)="providerTypeChange($event)" [(ngModel)]="providerType" name="reportingType" [nzSuffixIcon]='icon' nzAllowClear="false" nzPlaceHolder="请选择 ">
                                    <nz-option nzValue="0" nzLabel="法人"></nz-option>
                                    <nz-option nzValue="1" nzLabel="个人"></nz-option>
                                </nz-select>
                            </td>
                        </tr>
                    </table>
                    <table *ngIf="providerType==0">
                        <tr>
                            <td>单位名称：</td>
                            <td>
                                <input type="text" placeholder="单位名称" name="depname" [(ngModel)]="caseList.cmsCase.provider.depname">
                            </td>
                        </tr>
                        <tr>
                            <td>法人（负责人）：</td>
                            <td>
                                <input type="text" placeholder="法定代表人或负责人姓名" name="pic" [(ngModel)]="caseList.cmsCase.provider.pic">
                            </td>
                        </tr>
                        <tr>
                            <td>联系电话：</td>
                            <td>
                                <input type="text" placeholder="联系电话" name="telnum" [(ngModel)]="caseList.cmsCase.provider.telnum">
                            </td>
                        </tr>
                        <tr>
                            <td>联系地址：</td>
                            <td>
                                <input type="text" placeholder="联系地址" name="address" [(ngModel)]="caseList.cmsCase.provider.address">
                            </td>
                        </tr>
                        <tr>
                            <td>其他联系方式：</td>
                            <td>
                                <input type="text" placeholder="QQ/微信/邮箱号等" name="otherinfo" [(ngModel)]="caseList.cmsCase.provider.otherinfo">
                            </td>
                        </tr>
                    </table>
                    <table *ngIf="providerType==1">
                        <tr>
                            <td>姓名：</td>
                            <td>
                                <input type="text" placeholder="姓名" name="name" [(ngModel)]="caseList.cmsCase.provider.name">
                            </td>
                        </tr>
                        <tr>
                            <td>证件号码：</td>
                            <td>
                                <input type="text" placeholder="身份证或其他有效证件号码" name="idnum" [(ngModel)]="caseList.cmsCase.provider.idnum">
                            </td>
                        </tr>
                        <tr>
                            <td>联系电话：</td>
                            <td>
                                <input type="text" placeholder="联系电话" name="telnum" [(ngModel)]="caseList.cmsCase.provider.telnum">
                            </td>
                        </tr>
                        <tr>
                            <td>联系地址：</td>
                            <td>
                                <input type="text" placeholder="联系地址" name="address" [(ngModel)]="caseList.cmsCase.provider.address">
                            </td>
                        </tr>
                        <tr>
                            <td>其他联系方式：</td>
                            <td>
                                <input type="text" placeholder="QQ/微信/邮箱号等" name="otherinfo" [(ngModel)]="caseList.cmsCase.provider.otherinfo">
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="aytgr" *ngIf="caseList.cmsCase.sourceType==1003||caseList.cmsCase.sourceType==1004||caseList.cmsCase.sourceType==1005">
                <div class="commonTitle"><i></i>案源提供人</div>
                <div class="aytgrContent">
                    <table class="myTable">
                        <tr>
                            <td>名称：</td>
                            <td><input type="text" name="depname" id="" placeholder="部门名称" [(ngModel)]="caseList.cmsCase.provider.depname"></td>
                        </tr>
                        <tr>
                            <td>联系人：</td>
                            <td><input type="text" name="atten" id="" [(ngModel)]="caseList.cmsCase.provider.atten" placeholder="联系人"></td>
                        </tr>
                        <tr>
                            <td>联系电话：</td>
                            <td><input type="text" name="telnum" id="" [(ngModel)]="caseList.cmsCase.provider.telnum" placeholder="联系电话"></td>
                        </tr>
                        <tr>
                            <td>联系地址：</td>
                            <td><input type="text" name="address" id="" [(ngModel)]="caseList.cmsCase.provider.address" placeholder="联系地址"></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="dsrxx">
                <div class="commonTitle"><i></i>当事人信息</div>
                <div class="dsrxxContent">
                    <label>名称（姓名）：</label>
                    <input type="text" name="partyName" placeholder="企业名称或个人姓名" [(ngModel)]="caseList.cmsCase.partyName"><br>
                    <div class='table-select'>
                        <span>住所（住址）：</span>
                        <nz-select style="width: 160px;margin-right: 10px" name="province" [(ngModel)]="caseList.cmsCase.partyAddress.province" (ngModelChange)='onProvinceChange($event)' [nzSuffixIcon]='icon' nzAllowClear nzPlaceHolder="请选择省">
                            <ng-container *ngFor="let province of provinces">
                                <nz-option [nzValue]="province.key" [nzLabel]="province.label">{{province.label}}</nz-option>
                            </ng-container>
                        </nz-select>
                        <nz-select style="width: 160px;margin-right: 10px" [(ngModel)]="caseList.cmsCase.partyAddress.city" name="city" (ngModelChange)='onCityChange($event)' [nzSuffixIcon]='icon' nzAllowClear nzPlaceHolder="请选择盟市">
                            <ng-container *ngIf="cities">
                                <ng-container *ngFor="let city of cities ">
                                    <nz-option [nzValue]="city.key" [nzLabel]="city.label">{{city.label}}</nz-option>
                                </ng-container>
                            </ng-container>
                        </nz-select>
                        <nz-select style="width: 160px;margin-right: 10px" [(ngModel)]="caseList.cmsCase.partyAddress.county" name="county" (ngModelChange)='onCountyChange($event)' [nzSuffixIcon]='icon' nzAllowClear nzPlaceHolder="请选择区县">
                            <ng-container *ngIf="counties">
                                <ng-container *ngFor="let county of counties ">
                                    <nz-option [nzValue]="county.key" [nzLabel]="county.label">{{county.label}}</nz-option>
                                </ng-container>
                            </ng-container>
                        </nz-select>
                        <input type="text" [(ngModel)]="caseList.cmsCase.partyAddressDetail" autocomplete="off" name="partyAddressDetail" id="" placeholder="详细门牌地址">
                    </div>
                    <label>联系电话：</label>
                    <input type="text" name="phone" placeholder="联系电话" [(ngModel)]="caseList.cmsCase.partyPhone"><br>
                    <label>其他联系方式：</label>
                    <input type="text" name="otherPhone" placeholder="QQ/微信/邮箱号等" [(ngModel)]="caseList.cmsCase.partyOtherPhone"><br>
                </div>
            </div>
            <div class="aydjnr">
                <div class="commonTitle"><i></i>案源登记内容</div>
                <div class="aydjnrContent">
                    <label for="">案源登记内容：</label>
                    <textarea class="textarea" name="registerContent" id="" placeholder="案源登记内容，字数不限" [(ngModel)]="caseList.cmsCase.enrollmentContent"></textarea>
                    <br>
                    <label for="">案源处理意见：</label>
                    <textarea class="textarea" name="registerContent" id="" readonly="readonly" placeholder="案源处理意见，办案机构负责人填写"></textarea>
                    <br>
                    <label for="">备注：</label>
                    <textarea class="textarea2" name="beizhu" id="" placeholder="备注信息" [(ngModel)]="caseList.cmsCase.enrollmentRemark"></textarea>
                </div>
            </div>
            <div class="contentIndent">
                <button (click)="mysubmit()">保存并生成文书</button>
                <span class="span2" *ngIf="flags">数据保存失败，请重新提交</span>
                <span class="span1" *ngIf="flag">数据已保存并生成文书</span>
            </div>
        </div>
    </div>
</form>
<app-handelfullstaff [isExpand]='isExpand' name='addhandle' (expandAnimationFlag)='cardToggle($event)'></app-handelfullstaff>
<ng-template #icon>
    <i nz-icon nzType="caret-down" nzTheme="outline"></i>
</ng-template>